/**
 * ...
 * @author Franco Ponticelli
 */

package uform.ui.comp;
import uform.ui.comp.INamedComponent;
import uform.ui.comp.Control;
import uform.property.IProperty;
import uform.property.Property;
using Types;

class Group extends Stack, implements INamedComponent
{
	public var name(default, setName) : String;
	
	public function new(name : String)
	{
		super();
		this.name = name;
	}
	
	override function _id()
	{
		if (null == name || "" == name) 
			return "G";
		else
			return name;
	}

	override public function path()
	{

		var parts = [];
		if (!parent.isNull())
			parts.push(parent.get().path());
		if ("" != name && null != name)
			parts.push(name);
		return parts.join(".");
	}
	
	function setName(name : String)
	{
		return this.name = name;
	}
}